package thread;

import java.awt.*;

class point{

}
//当构造方法名字一样的时候，传参类型一样的时候，构不成方法重载，所以的用工厂来解决
class PointFactory{
    public static Point makePointByxy(double x,double y){
        Point point=new Point();
        return point;
    }
    public static Point makePointByra(double r,double a){
        Point point=new Point();
        return point;
    }
}
public class Demo33 {
    public static void main(String[] args) {
        Point p=PointFactory.makePointByra(1.2,2.2);
    }
}
